// ignore_for_file: file_names

import 'package:flutter/material.dart';

class MyApp4 extends StatelessWidget {
  const MyApp4({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        // 1.1 导航
        appBar: AppBar(
          title: const Text('Container组件'),
          backgroundColor: Colors.pink,
        ),
        // 1.2 主体内容
        body: Container(
          width: 300,
          height: 300,
          // 设置了边框和圆角需要把颜色放在decoration里面
          // color: Colors.blue,
          // 设置对齐方式
          alignment: Alignment.center,
          // 设置边框和圆角
          decoration: const BoxDecoration(
              color: Colors.blue,
              // border: Border.all(color: Colors.red, width: 5),
              // borderRadius: BorderRadius.circular(10)
              // 设置左边框
              border: Border(left: BorderSide(color: Colors.red, width: 10)),
              borderRadius:
                  BorderRadius.only(bottomRight: Radius.circular(10))),
          // 内边距
          // padding: const EdgeInsets.all(10),
          padding: const EdgeInsets.only(top: 10, left: 20),
          // 外边距
          margin: const EdgeInsets.all(20),
          child: const Text('我是text组件'),
        ));
  }
}
